package test4;

import java.util.StringTokenizer;

public class encodes {
	public static void main(String[] args){
		String a = "this is java";
		StringTokenizer s = new StringTokenizer(a);
		int token = s.countTokens();
		String[] translate = new String[token];
		int i=0;
		
		char[] pig = new char[token];
		
		while(s.hasMoreTokens()){
			translate[i] = s.nextToken();
			pig[i] = translate[i].charAt(0);
			i++;
		}
		
		//System.out.println(pig[0]);
		
		for(int j=0 ; j<token ; j++){
			for(int k=1 ; k<translate[j].length() ; k++){
				System.out.print(translate[j].charAt(k));
			}
			System.out.println(pig[j] + "ay");
		}
		
		//System.out.println(pig + "ay");
	}
}
